
import java.util.Scanner;
public class PersonAddressTest
{

    public static void main(String[] args)
    {

        PersonAddress test=new PersonAddress();

        test.setPersonAddress("三","张","123456789@qq.com","13286482029");

        System.out.println("对象1:\n姓名:    "+test.getLastName()+test.getFirstName());
        System.out.println("email:  "+test.getEmailAddress());
        System.out.println("电话号码: "+test.getPhoneNumber());

        PersonAddress test2=new PersonAddress();
        test2.setPersonAddress("四","李"," "," ");
        test2.setEmailAddress("1557605753@163.com");
        test2.setPhoneNumber("123456789");
        System.out.println("\n对象2:\n姓名:    "+test2.getLastName()+test2.getFirstName());
        System.out.println("email:  "+test2.getEmailAddress());
        System.out.println("电话号码: "+test2.getPhoneNumber());

        if(test.equals(test2))  System.out.println("对象1和对象2姓名相同");
        else   System.out.println("对象1和对象2姓名不同");

    }
}
